﻿


$(function () {


    on_update_panel_server(function () {


    });


    var abc = $("#DdlAutoFollNumber").selectToUISlider({
        labels: 0,
        sliderOptions: {
            stop: function (e, ui) {
            }
        }
    }).hide();

    var abc = $('select#speed2').selectToUISlider({
        labels: 0,
        sliderOptions: { 
            stop: function(e,ui) { 
            } 
        } 
    }).hide();

    var abc = $('select#speed3').selectToUISlider({
        labels: 0
    }).hide();


    var $tree = create_tree({
        layer: "#demo1",
        tree_type_id: var_server.tree_type_id,
        webservice_url: var_server.webservice_url,
        root_folder_id: var_server.root_folder_id,
        icons_path: var_server.icons_path,
        on_select_node: function (e, data) {
            $('#HidSelectFolderId').val(data.rslt.obj.attr("id"));
            $('#BtnReload_UpPEnquiry').click();
        },
        on_dnd: function (r) {
            $('#BtnReload_UpPEnquiry').click();
        }

    });


    $(document).on("click", "#ChkAllQuery", function () {
        c = $(this).is(':checked');
        //alert(c);
        $('.query_row input:checkbox[id^="ChkItem"]').prop('checked', c);
    });

    $(document).on("click", "#ChkAllProfile", function () {
        c = $(this).is(':checked');
        //alert(c);
        $('.profile_row input:checkbox[id^="ChkItem"]').prop('checked', c);
    });

    $("#add_folder").click(function () {
        $tree.jstree("create", null, "last", {
            attr: {
                rel: this.id.toString().replace("add_", "")
            }
        });
        return false;
    });

    $("#rename_folder").click(function () {
        $tree.jstree("rename");
        return false;

    });

    $("#remove_folder").click(function () {
        $tree.jstree("remove");
    });



});

